package tbalert.web.dao.impl;

import org.hibernate.HibernateException;

import tbalert.hibernate3.HibernateBaseDao;
import tbalert.web.dao.FxpgbDao;
import tbalert.web.entity.Fxpgb;

public class FxpgbDaoImpl extends HibernateBaseDao<Fxpgb, String> implements FxpgbDao {

	@Override
	public Fxpgb deleteById(String kicid) {
		Fxpgb entity = super.get(kicid);
		if (entity != null) {
			getSession().delete(entity);
		}
		return entity;
	}

	@Override
	public Fxpgb save(Fxpgb bean) throws HibernateException {
		getSession().save(bean);
		return bean;
	}

	@Override
	public Fxpgb findById(String kicid) {
		return get(kicid);
	}

	@Override
	public void update(Fxpgb fxpgb) {
		getSession().update(fxpgb);
	}

	@Override
	protected Class<Fxpgb> getEntityClass() {
		return Fxpgb.class;
	}
}
